﻿using SqlSugar;
using System.Collections.Generic;

namespace AuthorityManagement.Model
{
    /// <summary>
    /// 菜单表实体
    /// </summary>
    [SugarTable("Menu")]
    public class Menu : CLDEntityBase
    {
        //[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [SugarColumn(IsPrimaryKey = true,ColumnName = "F_Id", ColumnDescription = "菜单编码")]
        public string Id { get; set; }

        /// <summary>
        /// 菜单编码
        /// </summary>
        [SugarColumn(ColumnName = "F_MenuCode", ColumnDescription = "菜单编码")]
        public string MenuCode { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        [SugarColumn(ColumnName = "F_MenuName", ColumnDescription = "菜单名称")]
        public string MenuName { get; set; }

        /// <summary>
        /// 父级id
        /// </summary>
        [SugarColumn(ColumnName = "F_ParentId", ColumnDescription = "父级id")]
        public string ParentId { get; set; }
        /// <summary>
        /// 路径
        /// </summary>
        [SugarColumn(ColumnName = "F_URL", ColumnDescription = "排序字段")]
        public string URL { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnName = "F_Status", ColumnDescription = "状态")]
        public string Status { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [SugarColumn(ColumnName = "F_DeleteMark", ColumnDescription = "是否删除")]
        public string DeleteMark { get; set; }

        /// <summary>
        /// 是否有子集
        /// </summary>
        [SugarColumn(ColumnName = "F_IsChild", ColumnDescription = "是否有子集")]
        public string IsChild { get; set; }

        [SugarColumn(ColumnName = "F_Type", ColumnDescription = "类型(目录0菜单1)")]
        public string Type { get; set; }
        /// <summary>
        /// 菜单子项
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<Menu> Children { get; set; } = new List<Menu>();
    }
}
